package com.crm.service.orderManager;

import com.crm.model.entity.orderManager.CustomerOrderInvoice;
import com.crm.model.qo.orderManager.OrderInvoiceQO;
import com.crm.model.vo.orderManager.ApplyOrderInvoiceInfoVO;
import com.crm.model.vo.orderManager.OrderInvoiceVO;
import com.crm.model.vo.sys.InvoiceCompanyVO;

import java.util.List;

/**
 * @Author:chaifuyou
 * @Date: 2021/4/26 11:42
 */
public interface CustomerOrderInvoiceDbService {

    /**
     * 新增发票申请
     * @param customerOrderInvoice
     */
    void addOrderInvoice(CustomerOrderInvoice customerOrderInvoice);

    /**
     * 查询开票记录
     * @param qo
     * @param order
     * @param dateUnit
     * @return
     */
    List<OrderInvoiceVO> selectOrderInvoiceList(OrderInvoiceQO qo, String order, Integer dateUnit);

    /**
     * 修改开票审批状态
     * @param id
     * @param type
     */
    void updateExamineStatus(String id, String type);

    /**
     * 根据id查询发票信息
     * @param id
     * @return
     */
    CustomerOrderInvoice selectByPrimaryKey(String id);

    /**
     * 删除开票信息
     * @param id
     */
    void delOrderInvoice(String id);

    /**
     * 查看发票申请详情
     * @param chsCustomerOrderInvoiceId
     * @return
     */
    ApplyOrderInvoiceInfoVO selectApplyOrderInvoiceInfo(String chsCustomerOrderInvoiceId);

    /**
     * 通过主键查询开票详情
     * @param chsCustomerOrderInvoiceId
     * @return
     */
    OrderInvoiceVO selectOrderInvoiceById(String chsCustomerOrderInvoiceId);

    /**
     * 修改申请开票信息
     * @param customerOrderInvoice
     */
    void updateOrderInvoice(CustomerOrderInvoice customerOrderInvoice);

    List<CustomerOrderInvoice> selectOrderInvoiceByOrderId(String orderId);
}
